function exp_runtime_dimensions_SLICE()
    h=figure(1);
    runtimes_c3 =zeros(10,1);
    runtimes_c4 =zeros(10,1);
    runtimes_c5 =zeros(10,1);
    numatts = linspace(1,10,10);
    for i=2:length(numatts)
        data=DATAD300C3(i);
        runtimes_c3(i)=SLICE2_TIME(data);        
    end
    for i=2:length(numatts)
        data=DATAD300C4(i);
        runtimes_c4(i)=SLICE2_TIME(data);        
    end
    for i=2:length(numatts)
        data=DATAD300C5(i);
        runtimes_c5(i)=SLICE2_TIME(data);
    end
    runtimes=[runtimes_c3,runtimes_c4,runtimes_c5];
    save('exp_runtime_dimensions_SLICE2.mat','numatts','runtimes');
    plot(numatts, runtimes_c3, 'b-+');
    hold on;
    plot(numatts, runtimes_c4, 'r-*');
    hold on;
    plot(numatts, runtimes_c5,'g-o');
    hold on;
    saveas(h, 'figure_exp_runtime_dimensions_SLICE2.fig');
end

function [runtime]=SLICE2_TIME(data)
    runtime=0;
    tic;
    [corrplanes,sups]=SLICE2(data,1,0.000001,0.1);
    runtime=toc;
    corratts={};
    [M,N]=size(data);
    for i=1:length(corrplanes)
        corratts{i}=1:1:N;
    end
    displaycorrelations(corrplanes,sups,corratts,0.001, 'exp_SLICE.txt');
end

function data=DATAD300C3(numatts)
    numpoints=300;
    nosie_numpoints = int32(numpoints/4);
    numpoints=int32((numpoints-nosie_numpoints)/3);

    noise = randint(nosie_numpoints, numatts,[-200,200]);
    data = noise;
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j);
    end
    localdata=[x,y];
    data=[data;localdata];
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*(-1)^j;
    end
    localdata=[x,y];
    data=[data;localdata];
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*((-1)^j*j);
    end
    localdata=[x,y];
    data=[data;localdata];
end

function data=DATAD300C4(numatts)
    numpoints=300;
    nosie_numpoints = int32(numpoints/4);
    numpoints=int32((numpoints-nosie_numpoints)/3);
    
    noise = randint(nosie_numpoints, numatts,[-200,200]);
    data = noise;
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j);
    end
    localdata=[x,y];
    data=[data;localdata];
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*(-1)^j;
    end
    localdata=[x,y];
    data=[data;localdata];
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*((-1)^j*j);
    end
    localdata=[x,y];
    data=[data;localdata];

    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*((-1)^j*(j/2.0));
    end
    localdata=[x,y];
    data=[data;localdata];
end


function data=DATAD300C5(numatts)
    numpoints=300;
    nosie_numpoints = int32(numpoints/4);
    numpoints=int32((numpoints-nosie_numpoints)/3);
    
    noise = randint(nosie_numpoints, numatts,[-200,200]);
    data = noise;
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j);
    end
    localdata=[x,y];
    data=[data;localdata];
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*(-1)^j;
    end
    localdata=[x,y];
    data=[data;localdata];
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*((-1)^j*j);
    end
    localdata=[x,y];
    data=[data;localdata];
    x = randint(numpoints, numatts-1,[-200,200]);
    y = randn(numpoints,1);
    for j=1:numatts-1
        y = y+x(:,j).*(j*2.0);
    end
    localdata=[x,y];
    data=[data;localdata];
    
end